Skip to main content

Introduction

Generate professional marketing scripts automatically using JoggAI’s AI. Provide product information or a topic, and get multiple script variations optimized for your video length and language. Perfect for scaling video content production across multiple products, languages, and platforms.

Key Features

Auto-Generate

Create scripts from product info or descriptions

Multiple Styles

Get 3-5 script variations in different styles

Length Optimization

Scripts timed for 15/30/60 second videos

40+ Languages

Generate scripts in any supported language

Workflow Overview

AI script generation is a 2-step asynchronous process:
1

Submit Request

Send product info and requirements to AI
2

Retrieve & Select

Get generated scripts and choose your favorite
AI script generation typically completes in 10-30 seconds. You can start polling after 15 seconds.

Quick Start

EndpointPurposeDocumentation
POST /v2/ai_scriptsSubmit script generation requestAPI Reference
GET /v2/ai_scripts/results/{task_id}Get generated scriptsAPI Reference
POST /v2/productCreate product entryAPI Reference

Key Parameters

ParameterTypeRequiredDescription
languagestringScript language (e.g., “english”, “spanish”)
video_length_secondsstringVideo length: “15”, “30”, or “60”
script_stylestringStyle: “Don’t Worry”, “Storytime”, “Discovery”, “Data”, “Top 3 reasons”, “Light marketing”
product_infoobjectProduct information object
product_info.source_typestring“id” (use product ID) or “details” (provide details)
product_info.dataobjectProduct data (varies by source_type)
target_audiencestringTarget audience description (optional)
Product Info Required: Either provide a product_info.data.id (for existing products) or product_info.data.name and product_info.data.description (for new products).

Code Examples

Scenario 1: Generate Scripts from Product ID

Use an existing product to generate scripts:

Step 1: Submit Script Generation Request

curl --request POST \
  --url 'https://api.jogg.ai/v2/ai_scripts' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "language": "english",
    "video_length_seconds": "30",
    "script_style": "Storytime",
    "product_info": {
      "source_type": "id",
      "data": {
        "id": "NTQ0MTkzNjg"
      }
    }
  }'
Response:
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_123456789"
  }
}
Save the task_id - you’ll need it to retrieve your scripts!

Step 2: Retrieve Generated Scripts

Wait 15-30 seconds, then retrieve your scripts:
curl --request GET \
  --url 'https://api.jogg.ai/v2/ai_scripts/results/task_123456789' \
  --header 'x-api-key: YOUR_API_KEY'
Response (Completed):
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_123456789",
    "status": "completed",
    "data": {
      "generated_scripts": [
        {
          "script_style": "Storytime",
          "script_paragraphs": [
            "Ever tried drinking water while running?",
            "The Owala FreeSip bottle changes everything.",
            "Its unique spout lets you sip or swig - no spills, no fuss.",
            "Plus, it keeps drinks cold for 24 hours.",
            "Perfect for gym, work, or adventures!"
          ]
        },
        {
          "script_style": "Discovery",
          "script_paragraphs": [
            "Discover the Owala FreeSip - the water bottle that adapts to you.",
            "Sip through the straw or tilt to swig from the spout.",
            "Double-wall insulation keeps drinks ice-cold all day.",
            "Available in vibrant colors that match your style!"
          ]
        },
        {
          "script_style": "Top 3 reasons",
          "script_paragraphs": [
            "Three reasons to love the Owala FreeSip:",
            "One, the patented FreeSip spout for sipping or swigging.",
            "Two, 24-hour cold insulation.",
            "Three, leak-proof design for your bag.",
            "Upgrade your hydration game today!"
          ]
        }
      ]
    }
  }
}
The AI generates multiple script variations automatically. Choose the style that best fits your brand and audience!

Scenario 2: Generate Scripts with Product Details

Provide product details directly without creating a product entry:

Step 1: Submit Request with Product Details

curl --request POST \
  --url 'https://api.jogg.ai/v2/ai_scripts' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "language": "english",
    "video_length_seconds": "30",
    "script_style": "Discovery",
    "product_info": {
      "source_type": "details",
      "data": {
        "name": "Premium Yoga Mat",
        "description": "Eco-friendly yoga mat with superior grip and cushioning. Made from natural rubber with moisture-wicking surface. 6mm thickness provides excellent support."
      }
    },
    "target_audience": "Yoga enthusiasts and fitness lovers"
  }'
Response:
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_987654321"
  }
}

Step 2: Retrieve Generated Scripts

curl --request GET \
  --url 'https://api.jogg.ai/v2/ai_scripts/results/task_987654321' \
  --header 'x-api-key: YOUR_API_KEY'

Scenario 3: Check Generation Status

Poll to check if scripts are ready:
curl --request GET \
  --url 'https://api.jogg.ai/v2/ai_scripts/results/task_123456789' \
  --header 'x-api-key: YOUR_API_KEY'
Response (Still Processing):
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_123456789",
    "status": "processing"
  }
}
Response (Completed):
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_123456789",
    "status": "completed",
    "data": {
      "generated_scripts": [...]
    }
  }
}
Response (Failed):
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_123456789",
    "status": "failed",
    "err_msg": "Failed to generate script"
  }
}

Advanced Examples

Short 15-Second Scripts

Generate punchy scripts for quick social media videos:
curl --request POST \
  --url 'https://api.jogg.ai/v2/ai_scripts' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "language": "english",
    "video_length_seconds": "15",
    "script_style": "Light marketing",
    "product_info": {
      "source_type": "id",
      "data": {
        "id": "NTQ0MTkzNjg"
      }
    }
  }'
Sample Response:
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_123456789",
    "status": "completed",
    "data": {
      "generated_scripts": [
        {
          "script_style": "Light marketing",
          "script_paragraphs": [
            "Meet the Owala FreeSip - your new hydration hero!",
            "Sip or swig with one spout.",
            "Stays cold for 24 hours.",
            "Get yours today!"
          ]
        }
      ]
    }
  }
}

Multi-Language Scripts

Generate scripts in different languages:
curl --request POST \
  --url 'https://api.jogg.ai/v2/ai_scripts' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "language": "spanish",
    "video_length_seconds": "30",
    "script_style": "Storytime",
    "product_info": {
      "source_type": "id",
      "data": {
        "id": "NTQ0MTkzNjg"
      }
    }
  }'
Spanish Script Example:
{
  "code": 0,
  "msg": "Success",
  "data": {
    "task_id": "task_123456789",
    "status": "completed",
    "data": {
      "generated_scripts": [
        {
          "script_style": "Storytime",
          "script_paragraphs": [
            "¿Alguna vez intentaste beber agua mientras corres?",
            "La botella Owala FreeSip lo cambia todo.",
            "Su boquilla única te permite sorber o tragar - sin derrames, sin problemas.",
            "Además, mantiene las bebidas frías durante 24 horas.",
            "¡Perfecto para el gimnasio, trabajo o aventuras!"
          ]
        }
      ]
    }
  }
}
Supported languages include: English, Spanish, French, German, Japanese, Korean, Chinese, Portuguese, and 30+ more. See full list in the API Reference.

Script Style Guide

Understanding different script styles:
StyleCharacteristicsBest For
StorytimeNarrative, engaging, conversationalProducts with a journey or transformation
DiscoveryExciting, exploratory, unveilingNew or innovative products
Don’t WorryReassuring, problem-solvingProducts that solve pain points
DataFactual, statistics-drivenTech products, B2B
Top 3 ReasonsClear, structured, benefit-focusedFeature-rich products
Light MarketingFriendly, promotional, upbeatGeneral products, e-commerce
The AI automatically generates scripts in multiple styles so you can choose the best fit for your brand and audience.

Use Case Examples

Convert product pages into video scripts:
  • Use existing product IDs
  • Generate in multiple languages for global markets
  • Create variations for A/B testing
  • Batch process entire catalog
Create engaging scripts for social platforms:
  • Use 15-second scripts for TikTok/Reels
  • Try “Storytime” or “Discovery” styles
  • Generate in target market languages
  • Produce multiple versions weekly
Generate ad scripts quickly:
  • Test different messaging angles
  • Create urgency with “Don’t Worry” style
  • Use “Top 3 Reasons” for clarity
  • Localize for different regions
Scale video content production:
  • Generate scripts for product series
  • Create educational content
  • Produce weekly tips and tricks
  • Maintain consistent messaging

Tips for Best Results

Script Selection:
  • Match your brand voice by selecting style that aligns with brand personality
  • Know your audience: “Data” style for B2B, “Storytime” for consumers
  • Consider platform: Shorter, punchier scripts for social media
  • Test different styles: A/B test to find what resonates
Optimization Tips:
  • Be specific with product descriptions for better results
  • Include key features you want highlighted
  • Specify target audience for appropriate tone
  • Generate multiple times if not satisfied with first result
  • Provide detailed descriptions when using source_type: "details"
Best Practices:
  • Wait 15-30 seconds before checking results
  • Use product IDs when possible for better consistency
  • Generate multiple script variations and compare
  • Test different styles for the same product
  • Use appropriate video length for your platform

Troubleshooting

Issue: Generated scripts lack specificitySolutions:
  • Provide more detailed product descriptions
  • Include specific features and benefits
  • Specify target audience clearly
  • Add unique selling points
  • Use target_audience parameter
Issue: Scripts don’t match expected language or styleSolutions:
  • Verify language parameter is correct
  • Try different script_style options
  • Provide target_audience description
  • Add context about brand personality in product description
  • Check language spelling (e.g., “english” not “English”)
Issue: Script generation takes longer than expectedSolutions:
  • Wait up to 60 seconds before retry
  • Check task_id is correct
  • Verify API key permissions
  • Check product ID exists (if using source_type: "id")
  • Contact support if persists > 2 minutes
Issue: Response shows completed but no scriptsSolutions:
  • Check data.generated_scripts array in response
  • Verify product information is valid
  • Ensure product description is detailed enough
  • Try with different script_style
  • Retry with simpler product description